package com.practice.controller;

import com.practice.dao.daoImpl.DeptDaoImpl;
import com.practice.entity.Dept;
import com.practice.entity.MyReturn;
import com.practice.service.DetpService;
import com.practice.service.EmpService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;
import java.util.Map;

/**
 * @author:高杰领
 * @date:2021/11/19 14:36
 * @description:Dept控制层
 * @version:1.0
 **/
@Controller
public class DeptController {
    @Autowired
    private DetpService detpService;
    @Autowired
    private MyReturn myReturn;
    @RequestMapping("/selectDept.do")
    @ResponseBody
    public MyReturn selectDeptno(){
        List<Dept> list = detpService.selectAllDeptno();
        myReturn.setMsg("成功");
        myReturn.setData(list);
        myReturn.setCode(0);
        return myReturn;
    }
}
